package com.neusoft.yuejian_6.model;

import com.neusoft.yuejian_6.javabean.Feedback;
import com.neusoft.yuejian_6.service.FeedbackService;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Q on 2017/11/1.
 */

public class FeedbackModel {
    private Retrofit retrofit;

    public FeedbackModel() {
        retrofit = new Retrofit.Builder()
                .baseUrl("http://10.0.2.2/neu1_yuejian/index.php/Api/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    public Call<Feedback> addfeedback(int user_id, String feed_name, String feed_intro){
        FeedbackService feedbackService=retrofit.create(FeedbackService.class);
        return feedbackService.addfeedback(user_id, feed_name, feed_intro);
    }


//
//    //获取用户信息
//    public Call<Feedback> getfeedback(int feed_id) {
//        FeedbackService feedbackService = retrofit.create(FeedbackService.class);
//        return feedbackService.getfeedback(feed_id);
//    }

//    public Call<Feedback> addfeedback(int feed_id) {
//        FeedbackService feedbackService = retrofit.create(FeedbackService.class);
//        return feedbackService.edituser(feed_id);
//    }
//

}
